/**
 * 
 */
package com.zdy.im.tio.packets;


import com.sixeco.framework.common.api.ApiDesc;
import com.zdy.im.core.ImStatus;
import com.zdy.im.core.Status;

/**
 * 版本: [1.0]
 * 功能说明: 
 * @Author 作者 : zdy
 * @CreateDate 创建时间: 2021-02-30
 */
public class LoginResponseVo extends SocketResponseVo {
	
	private static final long serialVersionUID = 1L;
	@ApiDesc(value = "用户验证token")
	private String token;




	public LoginResponseVo(){}
	public LoginResponseVo(Status status){
		this.code = status.getCode();
		this.msg = status.getMsg();
	}

	public LoginResponseVo(Status status,String token ){
		this(status);
		this.token = token;
	}




	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public static LoginResponseVo success(){
		return new LoginResponseVo(ImStatus.C10007);
	}

	public static LoginResponseVo failed(){
		return new LoginResponseVo(ImStatus.C10008);
	}

	public static LoginResponseVo failed(String msg){
		LoginResponseVo loginRespBody = new LoginResponseVo(ImStatus.C10008);
		loginRespBody.setMsg(msg);
		return loginRespBody;
	}


}
